<?php 
include 'common.php';
$cc = "SELECT * FROM config ORDER BY id ASC";
$row_123 = select($cc,$DB);
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title><?php echo $row_123[0]['title'] ?></title>
	<link href="<?=$website['public'];?>/web/base.css" rel="stylesheet" type="text/css"/>
	<link href="<?=$website['public'];?>/web/tag.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="top">
	<div class="auto">
		<div class="nav">
			<img src="<?=$website['public'];?>/web/img/logo.png" style="width:30px; height:25px;margin:13px;" />
			<a href="../index.php">首页</a>
			<a href="/web/discus.php">讨论</a>
			<a href="/web/answers.php">问答</a>
			<a href="/web/node.php">节点</a>
			<a href="/web/tag.php">标签</a>
			<input type="text" name="name" placeholder="搜索" autocomplete="off" class="input">
			<div class="login right"><?php if ($_COOKIE['name']) {
				echo ($_COOKIE['name']);
			?>
			<a href="/web/logout.php?logout=1">退出登录</a>
			<?php
			} else { ?>
			<a href="/web/login.php">登录</a>
			<?php
			}
			 ?></div>
		</div>
	</div>
</div>
<div class="main auto fn-clear">
	<div class="bigbj">
		<div class="bj_l left">
			<div class="panel">
				<?php
					$sql = "SELECT * FROM tag ORDER BY id ASC";
					$row = select($sql,$DB);
					foreach ($row as $key => $value) { 
				?>	
				<div class="hot"><?php echo ['hot'] ?></div>
				<ul class="list fn-clear">
					<?php 
						$sql = "SELECT * FROM extendedfield WHERE tag_id = '{$value['id']}'";
						$row = select($sql,$DB);
						foreach ($row as $key => $value) { 
					?>
					<li class="one_list left">
						<h3>
							<a href="../index.php?id=<?php echo $value['id']?>"><?php echo $value['expand'] ?></a>
						</h3>
						<p><?php echo $value['content'] ?></p>
					</li>
					<li class="one_list left">
						<h3>
							<a href="../index.php?id=<?php echo $value['id']?>"><?php echo $value['expand'] ?></a>
						</h3>
						<p><?php echo $value['content'] ?></p>
					</li>
				</ul>
						<?php } ?>
				<?php } ?>
			</div>
		</div>
		<div class="bj_r right">
			<div class="two_list">
				<div class="jiedian">节点列表</div>
				<div class="jie_dian">
					<dl>
						<dt>官方专区</dt>
						<dd>
						<a href="">程序发布</a>
						<a href="">开发动态</a>
						<a href="">平台讨论</a>
						</dd>		
					</dl>
					<dl>
						<dt>DuxCMS</dt>
						<dd>
						<a href="">经验交流</a>
						<a href="">互助问答</a>
						<a href="">建议反馈</a>
						</dd>		
					</dl>
					<dl>
						<dt>Dux	SHOP</dt>
						<dd>
						<a href="">经验交流</a>
						<a href="">互助问答</a>
						<a href="">建议反馈</a>
						</dd>		
					</dl>	
					<dl>
						<dt>其他</dt>
						<dd>
						<a href="">站长交流</a>
						<a href="">站点展示</a>
						</dd>		
					</dl>
				</div>
			</div>
			<div class="two_list">
				<div class="jiedian">热门话题</div>
				<ul>
					<li><a href="">DuxPHP官方社区正式上线!</a></li>
					<li><a href="">DuxShop b2c正式版 v1.0.0发布</a></li>
					<li><a href="">大家好啊，我是新来的求照顾</a></li>
					<li><a href="">扩展字段如何在列表页调用?</a></li>
					<li><a href="">商品评价的时候带图就报错</a></li>
					<li><a href="">系统缺少备份与恢复，关于推送问题</a></li>
					<li><a href="">好像是个BUG</a></li>
					<li><a href="">目前测试发现的bug</a></li>
					<li><a href="">继续提交bug</a></li>
					<li><a href="">上传的图片url里，自动给主机名后面加上了端口，导致端口重复。</a></li>
				</ul>
			</div>
			<div class="three_list">
				<div class="jiedian">精华话题</div>
			</div>
		</div>
	</div>
</div>
<div class="bottom"><?php echo $row_123[0]['ICP'] ?></div>
</body>
</html>